﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Quickly.Identity.Domain;

public record Paging(int Index, int Size)
{

}

public static class PagingExtensions
{
    public static int GetSkipCount(this Paging paging)
    {
        var skipCount = (paging.Index - 1) * paging.Size;
        return skipCount < 0 ? 0 : skipCount;
    }
}
